<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<a class="sc_return" href="../example/01_newtab.html" data-index="0">返回</a>
<a class="sc_close_return" href="../example/01_newtab.html" data-index="0">关闭当前并返回</a>

<script src="https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script>

<script>

    $(function () {

        $(".sc_return").on("click", function () {
            top.window.newTab.call($(this));
            return false;
        });

        $(".sc_close_return").on("click", function () {

            //获取当前激活的导航tab
            var curTab = $(".page-tabs-content .active", window.parent.document);
            var curId = $(curTab).data('id') || "";

            //获取当前激活的导航tab下的关闭按纽
            var curTab_i = $('i', curTab);

            //打开指定tab方法
            var a = top.window.newTab.call($(this));

            //触发当前激活的导航tab下的关闭按纽事件
            var b = top.window.closeTab.call(curTab_i);

            return false;
        });

    });


</script>

</body>
</html>